Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: correct sourcemap with treeshake #1069

Merged
merged 6 commits into from
Jul 17, 2024
Merged

fix: correct sourcemap with treeshake #1069

merged 6 commits into from
Jul 17, 2024

Conversation

xia0hj
Copy link
Contributor

@xia0hj xia0hj commented Dec 28, 2023

depends on pr #890

related to issue #889 (comment)

  1. fix incorrect use of applySourceMap()
    correct example: https://github.com/mozilla/source-map/blob/master/test/test-source-map-generator.js#L356-L362

  2. set rollup treeshake output path to ./dist, so that sources in sourcemap can refer to ../src/index.ts instead of src/index.ts

closes #890, closes #889

Copy link

codesandbox bot commented Dec 28, 2023

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link

vercel bot commented Dec 28, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
tsup ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 17, 2024 2:26pm

@sxzz
Copy link
Collaborator

sxzz commented Jul 16, 2024

The unit test failed after rebasing. Could you please fix it?

@xia0hj
Copy link
Contributor Author

xia0hj commented Jul 17, 2024

@sxzz done!

@sxzz sxzz merged commit 6ca0cb0 into egoist:dev Jul 17, 2024
8 checks passed
@sxzz sxzz changed the title fix: fix incorrect sourcemap with --treeshake fix: correct sourcemap with treeshake Jul 17, 2024
Copy link
Contributor

🎉 This issue has been resolved in version 8.1.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sourcemaps break when using treeshake: 'smallest'
2 participants